<template>
	<view>
		<view class="" style="background-color: #FFFFFF;">
			<u-tabs style="background-color: #FFFFFF;width: 240rpx;" :list="list1" :scrollable='false' :inactiveStyle="{
				color: '#999999'}" :activeStyle="{
					color: '#333333',
					fontWeight: 'bold'
			}" lineColor="#9999FF" lineWidth="18" lineHeight="4" @click="click"></u-tabs>
		</view>
		<view class="release">
			<view class="">单价</view>
			<view class="release_input flex-between">
				<input type="text" placeholder="0.00" placeholder-class="textinput" /><text>元</text>
			</view>
		</view>
		<view class="release">
			<view class="">数量</view>
			<view class="release_input flex-between">
				<input type="text" placeholder="0.00" placeholder-class="textinput" />
				<view class="">
					<text>豆</text><span>最大</span>
				</view>
			</view>
			<view class="release_num" v-if="type==1">火豆余额 9,888.06</view>
			<view class="release_isnum">可得 ￥0.00</view>
		</view>
		<view class="paytype flex-between" @click="showtype=true">
			<view class="" v-if="type==1">支付方式</view>
			<view class="" v-if="type==2">收款方式</view>
			<view class="flex">
				<image class="img" :src="typeimg" mode=""></image>
				<text>{{paytype?paytype:'选择'}}</text>
				<image src="../../static/wallet/goin.png" mode=""></image>
			</view>
		</view>
		<u-picker :show="showtype" :columns="columnstype" keyName='nmae' @confirm="confirm"
			@cancel="showtype=false"></u-picker>
		<view class="btnsub" @click="$fun.jump(``)">
			发布
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list1: [{
						name: '转赠',
						id: 1
					},
					{
						name: '收赠',
						id: 2
					}
				],
				istype: 1,
				showtype: false,
				columnstype: [
					[{
						nmae: '微信',
						url: '../../static/wallet/wechat.png',
						id: 1
					}, {
						nmae: '支付宝',
						url: '../../static/wallet/Alipay.png',
						id: 2
					}, {
						nmae: '银行卡',
						url: '../../static/wallet/backid.png',
						id: 3
					}]
				],
				typeimg: '',
				paytype: '',
				type: 1
			}
		},
		methods: {
			click(item) {
				this.type = item.id
			},
			confirm(e) {
				console.log(e)
				this.paytype = e.value[0].nmae
				this.typeimg = e.value[0].url
				this.showtype = false
			},
		}
	}
</script>

<style lang="scss" scoped>
	.release {
		width: 690rpx;
		// height: 221rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		margin: 30rpx auto;
		box-sizing: border-box;
		padding: 22rpx;
		font-weight: 500;
		font-size: 32rpx;
		color: #333333;

		&_input {
			border-bottom: 1rpx solid #666666;
			margin-top: 60rpx;
			padding-bottom: 20rpx;

			.textinput {
				font-weight: 500;
				font-size: 48rpx;
				color: #CCCCCC;
			}

			span {
				font-weight: 500;
				font-size: 32rpx;
				color: #9999FF;
				margin-left: 30rpx;
			}
		}

		&_num {
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			margin: 20rpx 0 0rpx;
		}

		&_isnum {
			font-weight: 400;
			font-size: 28rpx;
			color: #333333;
			margin: 60rpx 0 10rpx;
		}
	}

	.paytype {
		width: 690rpx;
		height: 88rpx;
		background: #FFFFFF;
		border-radius: 24rpx;
		font-weight: 500;
		font-size: 28rpx;
		color: #333333;
		padding-left: 30rpx;
		box-sizing: border-box;
		margin: 0 auto 30rpx;

		text {
			color: #999999;
		}

		image {
			width: 48rpx;
			height: 48rpx;
		}

		.img {
			width: 23rpx;
			height: 23rpx;
			margin-right: 10rpx;
		}
	}
</style>